import FileUtils as fu

utils = fu.FileUtils

read_lines = utils.readLine(utils, r'D:\Users\yincy\Desktop\brand\storeidpoiid.txt')

# lines = utils.readLine(utils, r'D:\Users\yincy\Desktop\brand\poiid.txt')

brandlines = utils.readLine(utils, r'D:\Users\yincy\Desktop\brand\storeidbrandname.txt')

dic = {}
for read_line in read_lines:
    split = read_line.split("	")
    dic[split[0]] = split[1]

# count = 0
# exists = []
# for line in lines:
#     if line in dic:
#         count = count + 1
#         exists.append(line)
#
# #761585
# print("查询到了" + count)

count = 0
for brandline in brandlines:
    brandline_split = brandline.split('\t')
    if brandline_split[0] in dic:
        count = count + 1

# print("查询到了" + count)
print(count)
